RND Function ---------------------------------------------------------------------------- Action Returns a single-precision random number between 0 and 1. Syntax RND ( n#) Remarks The value of n# determines how RND generates the next random number. ----------------------------------------------------------------------------- Value Number returned ---------------------------------------------------------------------------- n# < 0 Always returns the same number for any given n#. n# > 0 or n omitted Returns the next random number in the sequence. n# = 0 Returns the last number generated. Even if n# > 0, the same sequence of random numbers is generated each time the program is run unless you initialize the random-number generator each time. (See the RANDOMIZE statement entry for more information about initializing the random-number generator.) To produce random integers in a given range, use this formula. INT (( upperbound - lowerbound + 1) * RND + lowerbound) In this formula, upperbound is the highest number in the range, and lowerbound is the lowest number in the range. Example See the RANDOMIZE statement programming example, which uses the RND function.